//
//  ThirdTableViewCell.m
//  豆瓣
//
//  Created by hy on 16/1/4.
//  Copyright © 2016年 hongyu. All rights reserved.
//

#import "ThirdTableViewCell.h"

@implementation ThirdTableViewCell


- (void)dealloc {
    [_addressLabel release];
    [_lanImage release];
    [_nameLabel release];
    [_dianLabel release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatCell];
    }
    return self;
}
- (void)creatCell {
    self.lanImage = [[UIImageView alloc] init];
    [self.contentView addSubview:_lanImage];
    [_lanImage release];
    
    self.nameLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_nameLabel];
    [_nameLabel release];
    
    self.addressLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_addressLabel];
    [_addressLabel release];
    
    self.dianLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_dianLabel];
    [_dianLabel release];
}
- (void)layoutSubviews {
    [super layoutSubviews];
    
    _lanImage.frame = CGRectMake(10, 10, self.contentView.frame.size.width - 20, self.contentView.frame.size.height - 20);
    _lanImage.backgroundColor = [UIColor clearColor];
    
    _nameLabel.frame = CGRectMake(20, 0, 350, 50);
    _nameLabel.backgroundColor = [UIColor clearColor];
    _nameLabel.font = [UIFont systemFontOfSize:22];
//    _nameLabel.textColor = [UIColor purpleColor];
    
    _addressLabel.frame = CGRectMake(20, 50, 300, 50);
    _addressLabel.backgroundColor = [UIColor clearColor];
    _addressLabel.font = [UIFont systemFontOfSize:18];
    _addressLabel.numberOfLines = 2;
//    _addressLabel.textColor = [UIColor purpleColor];
    
    _dianLabel.frame = CGRectMake(20, 100, 350, 50);
    _dianLabel.backgroundColor = [UIColor clearColor];
    _dianLabel.font = [UIFont systemFontOfSize:18];
//    _dianLabel.textColor = [UIColor purpleColor];
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
